///**
//  * Created by 冠东 on 2018/9/10.
//  */
//
//import org.apache.spark.SparkConf
//import org.apache.spark.SparkContext
//import org.apache.spark.rdd.RDD
//object WordCount {
//
//  def main(args: Array[String]) {
//    val inputFile =  "G://project/新建文本文档.txt"
//    val conf = new SparkConf().setAppName("WordCount").setMaster("local")
//    val sc = new SparkContext(conf)
//    val textFile = sc.textFile(inputFile)
//    val wordCount = textFile.flatMap(line => line.split(" ")).map(word => (word, 1)).reduceByKey((a, b) => a + b)
//    wordCount.foreach(println)
//  }
//
//
//}
//
